ποΈGitΠ―ΡΠ°ποΈ
.github/copilot-instructions.md 28dd35ef9c0ccff3ec5a513f4dd8194e732438d0 (28dd35ef) Text, 3.92 KB
Meshtastic Android β Copilot Instructions
β T383838AGENTS.md is the source of truth for rules, architecture, and conventions. This file is a compact
β Copilot quick-reference plus Copilot-only behavior rules β it deliberately does not restate
β AGENTS.md. For build/test detail see T383838.skills/testing-ci/; for the codebase map and bootstrap see
β T383838.skills/project-overview/.
Build, Test & Lint (essentials)
Requires JDK 25 and T383838ANDROID_HOME. Per fresh clone:
T282828
Tff7b72[ -f local.properties Tff7b72] Tff7b72|| cp secrets.defaults.properties local.properties
T282828
./gradlew spotlessApply spotlessCheck detekt assembleDebug Tffa657test allTests T8b949e# full local verification (run before push)
./gradlew :core:data:allTests T8b949e# single KMP module
./gradlew :androidApp:testFdroidDebugUnitTest T8b949e# single Android-only module
./gradlew kmpSmokeCompile T8b949e# cross-platform compile check, no tests
β Both T383838test AND T383838allTests are needed β T383838allTests covers KMP modules, T383838test covers pure-Android
β modules.
KMP vs Android-only task naming (wrong name silently skips tests or fails resolution): KMP modules (T383838core:*, T383838feature:*) use T383838:module:allTests and T383838:module:compileKotlinJvm; Android-only modules (T383838androidApp, T383838desktopApp, T383838core:barcode) use T383838:module:testFdroidDebugUnitTest (plain T383838:desktopApp:test for the JVM-only desktop module). T383838:module:detekt is the lifecycle task for both β never T383838detektMain/T383838detektDebug. Full matrix and pitfalls: T383838.skills/testing-ci/.
Architecture, flavors, conventions, branch naming, protos, coding rules: see T383838AGENTS.md. Contextual T383838.github/instructions/ files enforce conventions scoped to specific source sets.
Copilot-Only Behavior Rules
These are specific to the Copilot CLI environment and are not covered in AGENTS.md.
β’ Do it right the first time. When refactoring, implement the correct solution fully β don't defer improvements as "out of scope". Research the proper API before implementing.
β’ Preserve commit history. Always make new commits. Never T383838--amend, T383838rebase -i, squash, or T383838--force-with-lease unless the user explicitly requests it.
β’ Workflow-scope push limit. The Copilot CLI OAuth token cannot push to T383838.github/workflows/. If a push fails with a scope/permission error on workflow files, tell the user to push manually (T383838gh auth refresh -s workflow && git push) β do not retry or work around it.
β’ No destructive git in parallel agents. Agents sharing a worktree must never run T383838git reset --hard, T383838git clean, or T383838git checkout -- .. Commit work before any index/working-tree operation.
β’ Audit before applying. When porting or migrating external code, evaluate each change for relevance and correctness in our context β don't blindly copy.
Context & Cost Efficiency
β’ Compact before research phases. Open-ended research/exploration generates high-volume tool output β compact first.
β’ Split sessions at phase boundaries. Don't keep one session alive across multiple discrete deliverables (PR opened, spec finalized, merged). A compact summary in a fresh session is cheaper than carrying accumulated history.
β’ Don't re-inject skill context. If a skill's context is already in the session, reference it rather than re-injecting the full payload (a brief summary suffices after compaction).
β’ PR check-ins get their own session. Merge/CI-status polling needs only PR metadata β run it in a short-lived session, not the dev session.
β’ Compact by ~turn 12. Later turns pay for the full accumulated history; don't let exploratory sessions run 15+ turns uncompacted.
<!-- SPECKIT START -->
For additional context about technologies to be used, project structure,
shell commands, and other important information, read the current plan at
specs/20260711-153545-message-markdown-styling/plan.md
<!-- SPECKIT END -->
Served by rngit 1.5.2 - Generated in 0.07s